<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui">

    <h:form id="PyfntbrequerListForm">

        <p:panel header="#{myBundle.ListPyfntbrequerTitle}">

            <p:dataTable id="datalist" value="#{pyfntbrequerController.items}" var="item"
                         selectionMode="single" selection="#{pyfntbrequerController.selected}"
                         rowKey="#{item.pyfntbrequerid}"
                         paginator="true"
                         rows="5"
                         rowsPerPageTemplate="5,10,20,30"
                         >

                <p:ajax event="rowSelect"   update="createButton viewButton editButton deleteButton"/>
                <p:ajax event="rowUnselect" update="createButton viewButton editButton deleteButton"/>

                <p:column sortBy="#{item.pyfntbrequerid}" filterBy="#{item.pyfntbrequerid}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbrequerTitle_pyfntbrequerid}"/>
                    </f:facet>
                    <h:outputText value="#{item.pyfntbrequerid}"/>
                </p:column>
                <p:column sortBy="#{item.nombre}" filterBy="#{item.nombre}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbrequerTitle_nombre}"/>
                    </f:facet>
                    <h:outputText value="#{item.nombre}"/>
                </p:column>
                <p:column sortBy="#{item.unidadmed}" filterBy="#{item.unidadmed}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbrequerTitle_unidadmed}"/>
                    </f:facet>
                    <h:outputText value="#{item.unidadmed}"/>
                </p:column>
                <p:column sortBy="#{item.codincop}" filterBy="#{item.codincop}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbrequerTitle_codincop}"/>
                    </f:facet>
                    <h:outputText value="#{item.codincop}"/>
                </p:column>
                <p:column sortBy="#{item.fecharegistro}" filterBy="#{item.fecharegistro}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbrequerTitle_fecharegistro}"/>
                    </f:facet>
                    <h:outputText value="#{item.fecharegistro}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:outputText>
                </p:column>
                <p:column sortBy="#{item.aprobacion}" filterBy="#{item.aprobacion}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbrequerTitle_aprobacion}"/>
                    </f:facet>
                    <h:outputText value="#{item.aprobacion}"/>
                </p:column>
                <p:column sortBy="#{item.notas}" filterBy="#{item.notas}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbrequerTitle_notas}"/>
                    </f:facet>
                    <h:outputText value="#{item.notas}"/>
                </p:column>
                <p:column sortBy="#{item.valorunit}" filterBy="#{item.valorunit}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbrequerTitle_valorunit}"/>
                    </f:facet>
                    <h:outputText value="#{item.valorunit}"/>
                </p:column>
                <p:column sortBy="#{item.cantidad}" filterBy="#{item.cantidad}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbrequerTitle_cantidad}"/>
                    </f:facet>
                    <h:outputText value="#{item.cantidad}"/>
                </p:column>
                <p:column sortBy="#{item.observaciones}" filterBy="#{item.observaciones}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbrequerTitle_observaciones}"/>
                    </f:facet>
                    <h:outputText value="#{item.observaciones}"/>
                </p:column>
                <p:column sortBy="#{item.pyfntbtipobienid.pyfntbtipobienid}" filterBy="#{item.pyfntbtipobienid.pyfntbtipobienid}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbrequerTitle_pyfntbtipobienid}"/>
                    </f:facet>
                    <h:outputText value="#{item.pyfntbtipobienid.pyfntbtipobienid}"/>
                </p:column>
                <p:column sortBy="#{item.pyfntbpoaprogid.pyfntbpoaprogid}" filterBy="#{item.pyfntbpoaprogid.pyfntbpoaprogid}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbrequerTitle_pyfntbpoaprogid}"/>
                    </f:facet>
                    <h:outputText value="#{item.pyfntbpoaprogid.pyfntbpoaprogid}"/>
                </p:column>
                <p:column sortBy="#{item.pyfntbpartidaid.descripcion}" filterBy="#{item.pyfntbpartidaid.descripcion}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbrequerTitle_pyfntbpartidaid}"/>
                    </f:facet>
                    <h:outputText value="#{item.pyfntbpartidaid.descripcion}"/>
                </p:column>
                <f:facet name="footer">
                    <p:commandButton id="createButton" icon="ui-icon-plus"   value="#{myBundle.Create}" actionListener="#{pyfntbrequerController.prepareCreate}" update=":PyfntbrequerCreateForm" oncomplete="PyfntbrequerCreateDialog.show()"/>
                    <p:commandButton id="viewButton"   icon="ui-icon-search" value="#{myBundle.View}" update=":PyfntbrequerViewForm" oncomplete="PyfntbrequerViewDialog.show()" disabled="#{empty pyfntbrequerController.selected}"/>
                    <p:commandButton id="editButton"   icon="ui-icon-pencil" value="#{myBundle.Edit}" update=":PyfntbrequerEditForm" oncomplete="PyfntbrequerEditDialog.show()" disabled="#{empty pyfntbrequerController.selected}"/>
                    <p:commandButton id="deleteButton" icon="ui-icon-trash"  value="#{myBundle.Delete}" actionListener="#{pyfntbrequerController.delete}" update=":growl,datalist" disabled="#{empty pyfntbrequerController.selected}"/>
                </f:facet>

            </p:dataTable>

        </p:panel>

    </h:form>

</ui:composition>